﻿@model Parichay.Domain.MemberMessage

@{
    ViewBag.Title = "MsgDtl";
}
@section Styles {
<link href="@Url.Content("~/Content/Styles/jquery.ui.css")" rel="stylesheet" type="text/css" />

}

@section Scripts
{
<script src="@Url.Content("~/Content/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function ($) {

        $('DIV.modalWin').dialog({ autoOpen: false }); // or hide in css
        //$('DIV.modalWin').modal();


        $('a.openModal').click(function () {
            var divNm = '#' + $(this).attr('data-name');
            $(divNm).dialog('open');
        });

        $('DIV.rplyBox').toggle('slow');

        $('a.showreply').click(function () {
            var divNm = '#' + $(this).attr('data-name');
            $(divNm).toggle('slow');
        });
    });
</script>
}
<fieldset>
<legend>Message Replies</legend>
@if (Model != null)
{
 <div class="cmtMainBox">
     <div class="cmtHeading"><span>My Messages:</span></div>
@Html.Partial("BO/msg", Model)
</div>
    <br />
    using (Html.BeginForm("ReplyMessage", "Message"))
    {
        Html.ValidationSummary(true);

    <table class="tblAllBorders">
        <tr><th>Reply to Message:</th></tr>
        <tr><td><div class="editor-field">
        
        @Html.Hidden("id", Model.Id)
        @Html.Hidden("rId", Model.Sender.Id)

            @Html.TextAreaFor(model => model.Text, 2, 58, null)
            @Html.ValidationMessageFor(model => model.Text)
        </div></td></tr>
        <tr>
        <td style="text-align:right"><input type="submit" value="Post" /></td>
        </tr>
        </table>
    }
}
else
{
    <p>Sorry something went wrong. Perhaps the message was deleted by the sender.</p>
}

</fieldset>
